import java.util.ArrayList;
import java.util.List;

public class Zoo {
    private List<Zone> zones;

    public Zoo() {
        this.zones = new ArrayList<>();
    }

    public void addZone(Zone zone) {
        zones.add(zone);
    }

    public void removeZone(Zone zone) {
        zones.remove(zone);
    }

    public Zone getZoneByName(String name) {
        for (Zone zone : zones) {
            if (zone.getName().equals(name)) {
                return zone;
            }
        }
        throw new IllegalArgumentException("Zone not found: " + name);
    }

    public void displayZones() {
        System.out.println("Zones in the zoo:");
        zones.forEach(zone -> System.out.println(zone.getName()));
    }
}
